<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <input name="productId" th:value="${product.productId}" type="hidden">

                        <div class="form-group">
                            <label class="col-sm-3 control-label">
                                产品名称：
                                <span style="color: #e7262a">*</span>
                            </label>
                            <div class="col-sm-8">
                                <input name="productName" th:value="${product.productName}" class="form-control"
                                       type="text" required placeholder="产品名称（必填）">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">
                                产品规格：
                                <span style="color: #e7262a">*</span>
                            </label>
                            <div class="col-sm-8">
                                <input name="productSpec" th:value="${product.productSpec}" class="form-control"
                                       type="text" required placeholder="产品规格（必填）">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">
                                单位：
                                <span style="color: #e7262a">*</span>
                            </label>
                            <div class="col-sm-8">
                                <input name="unit" th:value="${product.unit}" class="form-control"
                                       type="text" required placeholder="单位（必填）">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">
                                产品价格(单位/分)：
                                <span style="color: #e7262a">*</span>
                            </label>
                            <div class="col-sm-8">
                                <input name="productPrice" th:value="${product.productPrice}" class="form-control"
                                       type="number"  onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"  required placeholder="产品价格必须为整数">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">
                                保质期：
                                <span style="color: #e7262a">*</span>
                            </label>
                            <div class="col-sm-8">
                                <input name="warranty" th:value="${product.warranty}" class="form-control" type="text"
                                       required placeholder="保质期（必填）">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">
                                积分：
                                <!--<span style="color: #e7262a">*</span>-->
                            </label>
                            <div class="col-sm-8">
                                <input name="integral" th:value="${product.integral}" class="form-control" type="number"  onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"
                                       placeholder="积分">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">
                                检测模板：
                                <!--<span style="color: #e7262a">*</span>-->
                            </label>
                            <div class="col-sm-4">
                                <select id="checkTemplateId" name="checkTemplateId" class="form-control" >
                                </select>
                            </div>
                            <div class="col-sm-4 input-group">
                                <input type="text" id="templateName" class="form-control" placeholder="搜索检测模版">
                                <span class="input-group-btn"> <button type="button" class="btn btn-primary" onclick="getCheckTemplateByUpdate()">搜索
								    </button> </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" th:inline="javascript">
    function getCheckTemplateId() {
        var typeId = [[${product.checkTemplateId}]]
        return typeId;
    }
</script>
<script type="text/javascript" th:src="@{/js/appjs/product/edit.js}" src="/static/js/appjs/product/edit.js">
</script>
</body>
</html>
